home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness:…ecision-Making Strategies / Workplace Effectiveness: Decision-Making Strategies.iso / pc / Files / Measure.dxr / 00008_PRINT & Write text file.ls < prev    next >
Encoding:
Text File  |  1998-12-16  |  1.5 KB  |  42 lines

  1. global gMasterData
  2.  
  3. on printButton
  4.   if iAmActivated(gMasterData) then
  5.     getPrintData()
  6.     set vThisField to string(getUserArea(gMasterData)) && "field"
  7.     print(the text of member vThisField)
  8.   else
  9.     alert("Printing is unavailable until an activity is completed.")
  10.   end if
  11. end
  12.  
  13. on getPrintData
  14.   set vThisField to string(getUserArea(gMasterData)) && "field"
  15.   set the text of member vThisField to EMPTY
  16.   set vTempText to EMPTY
  17.   put "---- Measure Of Strength ----------" & RETURN & RETURN after vTempText
  18.   put "This activity allows you to assess your strength in making decisions. How you rated yourself appears next to each statement. 1 is the least and 4 is the most that can be scored on each statement. Your score is below." & RETURN & RETURN after vTempText
  19.   put getBigString() & RETURN & RETURN after vTempText
  20.   put RETURN after vTempText
  21.   set the text of member vThisField to vTempText
  22. end
  23.  
  24. on getBigString
  25.   set vText to EMPTY
  26.   repeat with X = 1 to 12
  27.     put line X of field "print1 field" & " " after vText
  28.     put line X of field "print2 field" & RETURN after vText
  29.   end repeat
  30.   put RETURN & "Score:" && the text of field "score field" & RETURN & RETURN after vText
  31.   set theScore to value(the text of field "score field")
  32.   case 1 of
  33.     (theScore > 35):
  34.       put line 13 of field "print1 field" & RETURN after vText
  35.     (theScore > 20):
  36.       put line 14 of field "print1 field" & RETURN after vText
  37.     otherwise:
  38.       put line 15 of field "print1 field" & RETURN after vText
  39.   end case
  40.   return vText
  41. end
  42.